package com.cloud.shopping.seckill.feign;

import com.cloud.shopping.seckill.model.SeckillGoods;
import com.cloud.shopping.tool.RespResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author John.zhang
 * @version Id: SeckillGoodsFeign, v 1.0 2021/1/8 10:53 ZhiYong Exp $
 */

@FeignClient(value = "shopping-seckill")
public interface SeckillGoodsFeign {

    /**
     * 根据活动查询秒杀商品集合
     *
     * @param acid acid
     * @return List
     */
    @GetMapping(value = "/seckill/goods/act/{acid}")
    RespResult<List<SeckillGoods>> actGoods(@PathVariable("acid") String acid);

    /**
     * 根据ID查询秒杀商品详情
     *
     * @param id id
     * @return SeckillGoods
     */
    @GetMapping(value = "/seckill/goods/{id}")
    RespResult<SeckillGoods> one(@PathVariable("id") String id);

}
